package com.neouton.crm.op.entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.neouton.common.entity.BaseEntityVO;
import com.neouton.crm.customer.entity.CustomerVO;
import com.neouton.crm.sales.entity.SalesFileRelationVO;
import com.neouton.encrypt.typehandler.Encrypt;
import lombok.Data;

/**
 * 机会点备份表
 * @TableName sales_opportunity_back
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SalesOpportunityBackVO extends BaseEntityVO implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键自增
     */
    private Integer id;

    /**
     * 机会主键
     */
    private Integer opportunityId;

    /**
     * 机会编号
     */
    private String opportunityNumber;

    /**
     * 机会名称
     */
    private String opportunityTheme;

    /**
     * 客户id
     */
    private Integer customerId;

    // 客户名
    private String customerName;

    // 联系人
    private String customerContact;

    // 联系人电话
    private String customerPhone;

    /**
     * 客户需求
     */
    private String customerNeeds;

    /**
     * 关联客户表
     */
    private CustomerVO customer;

    /**
     * 发现时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp discoveryTime;

    /**
     * 所有者信息
     */
    private Integer owner;

    private String ownerName;

    private String ownerAccount;

    private String ownerDepts;
    /**
     * 预计签单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Timestamp expectedSigningDate;

    /**
     * 合同总金额
     */
    private Encrypt expectedAmount;
    /**
     * 合同金额值
     */
    private String expectedAmountValue;

    /**
     * 金额外币备注
     */
    private String amountType;

    /**
     * 可能性
     */
    private Integer opportunityPossibility;

    /**
     * 状态
     */
    private Integer opportunityState;

    /**
     * 机会状态名
     */
    private String opportunityStateName;

    /**
     * 审核前状态
     */
    private Integer opportunityStateBack;

    /**
     * 抄送对象ID，逗号分隔
     */
    private String copyFor;

    /**
     * 抄送人姓名，逗号分隔，用于前端页面展示
     */
    private String copyForNames;

    /**
     * 当前工作流ID
     */
    private Integer businessId;

    /**
     * 审核状态
     */
    private Integer auditState;
    /**
     * 审核状态名
     */
    private String auditStateName;

    /**
     * 创建人信息
     */
    private String creatorName;

    private String creatorAccount;

    private String creatorDepts;

    /**
     * 修改者信息
     */
    private String modifierName;

    private String modifierAccount;

    private String modifierDepts;

    /**
     * 阶段状态id
     */
    private Integer stageStateId;

    /**
     * 阶段状态名
     */
    private String stageStateName;

    /**
     * 阶段备注
     */
    private String stageRemark;

    /**
     * 阶段变更时间
     */
    private Timestamp stageUpdateTime;

    /**
     * 当前阶段停留天数
     */
    private Integer stageStayTime;

    /**
     * 文件
     */
    private List<SalesFileRelationVO> messageFileRelation;

    /**
     * 文件id集
     */
    private List<String> fileIds;

    private Integer deleted;



    /**
     * 高级查询条件
     * 客户
     */
    private List<Integer> customerIds;

    /**
     * 所有者ID
     */
    private List<Integer> ownerIds;

    /**
     * 发现时间起点
     */
    private Timestamp discoveryTimeStart;

    /**
     * 发现时间结束
     */
    private Timestamp discoveryTimeEnd;

    /**
     * 预计签单日起点
     */
    private Timestamp expectedSigningDateStart;

    /**
     * 预计签单日结束
     */
    private Timestamp expectedSigningDateEnd;

    /**
     * 创建时间开始
     */
    private Timestamp createDataTimeStart;

    /**
     * 创建时间结束
     */
    private Timestamp createDataTimeEnd;

    /**
     * 阶段ID
     */
    private List<Integer> stageStateIds;
    /**
     * 阶段停留时间最小值
     */
    private Integer stageStayTimeMin;

    /**
     * 阶段停留时间最大值
     */
    private Integer stageStayTimeMax;

    /**
     * 机会可能性
     */
    private List<Integer> opportunityPossibilities;

    /**
     * 项目合同金额集合
     */
    private List<String> expectedAmountList;
    /**
     * 合同总金额最小值
     */
    private Encrypt expectedAmountMin;

    /**
     * 合同总金额最大值
     */
    private Encrypt expectedAmountMax;

    /**
     * 审核状态
     */
    private List<Integer> auditStates;

    /**
     * 机会状态
     */
    private List<Integer> opportunityStates;

    /**
     * 申请原因
     */
    private String reasonApplication;

    /**
     * 审批意见
     */
    private String processComments;

    /**
     * 审批主表ID
     */
    private Integer approvalId;

    /**
     * 版本
     */
    private Integer version;

    /**
     * 备份人
     */
    private Integer backer;

    /**
     * 备份时间
     */
    private Date backeDate;

    /**
     * 前端排序标识
     */
    private String orderByColum;

    private String orderByProp;

    private String order;

    /**
     * 迁移状态0：未迁移 1：已迁移 2：迁移中
     */
    private Integer migrateState;
}